<?php
class TypeModel extends Model{
	public $table="type";
	public $validate=array(
	array('typename','nonull','类型名称不能为空',2,3)
	);
	
	public function updateData($id){
		if(!$this->create())return false;
	
		return $this->where("id='{$id}'")->update();
		
	}
	public function addData(){
		if(!$this->create()){
			return false;
		}
		return $this->add();
		
	}
}
 ?>